package com.clqteam.daoimpl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.clqteam.dao.DailyDao;
import com.clqteam.util.JDBCutil;
/**
 * 供应商功能日志的dao
 * @author Administrator LXG
 *
 */
public class DailyDaoImpl implements DailyDao{
	/**各功能操作的日志
	 * 
	 * @param function 具体操作
	 * @param eId	操作人的id
	 * @param eName 操作人的名
	 * @return
	 */
	@Override
	public boolean functionDaily(String function,int eId,String eName) {
		boolean b=false;
		StringBuffer sql=new StringBuffer("");
		sql.append(" INSERT INTO s_dailyreport (s_dailyreport.drTime,s_dailyreport.drInfo,s_dailyreport.eId,s_dailyreport.eName)");
		sql.append(" VALUES (NOW(),?,?,?)");
		Connection con=JDBCutil.getConnection();
		try {
			PreparedStatement ps=con.prepareStatement(sql.toString());
			ps.setString(1, function);
			ps.setInt(2, eId);
			ps.setString(3, eName);
			int i=ps.executeUpdate();
			if(i>0){
				b=true;
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return b;
	}

	

}
